(function(){


    let url = location.href
    // console.log(url);
    let {productid}= getUrlParams(url);
    // console.log(param);


    fetch(`http://chst.vip:1234/api/getmoneyctrlproduct?productid=${productid}`)
    .then(body=>body.json())
    .then(res=>{
        // console.log(res);
        let result= res.result[0]
        // ${result.}
        let html=
        `
        <div class="fetch">
            <h4>${result.productName}</h4>
            <div><span> ${result.productFrom} | ${result.productTime}</span>  <i>${result.productTips}</i></div>
            <p>
            ${result.productImgSm}
            ${result.productInfo}
            </p>
            ${result.productImgSm}
            <ul>
                <li>${result.productCity}</li>
            </ul>
        </div>
        
        <div class="buy">前往购买</div>
        <img src="/assets/images/mmbweixin2.png" alt="">
        <div class="comments">
            <span class="top"></span>
            <span class="bottom">提交评论</span>
        
        `
        $('#nav').html(html)
    })


})()